//package com.bw.baserecyclerview.quick;
//
//import android.os.Bundle;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.widget.Button;
//
//import androidx.annotation.NonNull;
//import androidx.annotation.Nullable;
//import androidx.appcompat.app.AppCompatActivity;
//import androidx.recyclerview.widget.GridLayoutManager;
//import androidx.recyclerview.widget.LinearLayoutManager;
//import androidx.recyclerview.widget.RecyclerView;
//import androidx.viewpager2.widget.ViewPager2;
//
//import com.bw.baserecyclerview.R;
//
//import java.util.ArrayList;
//import java.util.List;
//
//public class BasicActivity extends AppCompatActivity implements View.OnClickListener, BaseQuickAdapter.OnItemChildClickListener, BaseQuickAdapter.OnItemClickListener {
//
//    private RecyclerView recyclerView;
//    private Button addBtn;
//    private BasicAdapter adapter;
//    private List<String>list = new ArrayList<>();
//
//    @Override
//    protected void onCreate(@Nullable Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_diff);
//        initView();
//        initData();
//        adapter.setNewInstance(list);
//    }
//
//    private void initView(){
//        recyclerView = findViewById(R.id.diff_rv);
//        addBtn = findViewById(R.id.diff_update_btn);
//        addBtn.setOnClickListener(this);
////        LinearLayoutManager manager = new LinearLayoutManager(this);
////        manager.setOrientation(LinearLayoutManager.VERTICAL);
//        GridLayoutManager manager = new GridLayoutManager(this,2);
//        manager.setOrientation(LinearLayoutManager.VERTICAL);
//        recyclerView.setLayoutManager(manager);
//        adapter = new BasicAdapter();
//        View headView = LayoutInflater.from(this).inflate(R.layout.layout_head,null,false);
//        View footView = LayoutInflater.from(this).inflate(R.layout.layout_foot,null,false);
//        adapter.setHeaderView(headView);
//        adapter.setFootView(footView);
//        adapter.setOnItemChildClickListener(this);
//        adapter.setOnItemClickListener(this);
//        recyclerView.setAdapter(adapter);
//    }
//
//    private void initData(){
//        for (int i = 0; i < 20;i ++){
//            list.add("item:"+i);
//        }
//    }
//
//    @Override
//    public void onClick(View view) {
//        list = new ArrayList<>();
//        for (int i = 0; i < 20;i ++){
//            list.add("test:"+i);
//        }
////        list.set(0,"test");
//        adapter.setNewInstance(list);
//    }
//
//    @Override
//    public void onItemClick(BaseQuickAdapter adapter, int possition) {
//        Log.e("ZXY","onItemClick:"+adapter.getData().get(possition).toString());
//    }
//
//    @Override
//    public void onItemChildClick(BaseQuickAdapter adapter, int id, int possition) {
//        Log.e("ZXY","onItemChildClick:"+adapter.getData().get(possition).toString());
//    }
//}
